<template>
  <div class="swiper-container" :class="swiperclass">
    <div class="swiper-wrapper">
      <slot></slot>
    </div>
  </div>
</template>

<script>
import Swiper from "swiper";
import "swiper/swiper-bundle.min.css";
export default {
  name: "DetailSwiper",
  props: {
    slide: {
      type: Number,
      default: 1,
    },
    swiperclass: {
      type: String,
      default: 'swiper-container',
    }
  },
  mounted() {
    new Swiper("."+this.swiperclass, {
      slidesPerView: this.slide,
      spaceBetween: 10,
      freeMode: true
    });
  },
};
</script>
<style lang="less" scoped>
.swiper-container{
  padding-top: 10px;
  width: 100%;
}
</style>